onPlayed

abstract fun onPlayed(source: Source)

Called when a specific piece of content (source) has been played or displayed.

This method is invoked when the player system registers that the content item identified by the Source object has entered an active playback or display state. The source object provides details about the content that was played (e.g., its ID, type, URI).

Implementers can use this callback to:

  • Log proof-of-play for the specific content item.
  • Gather analytics data on content viewership.
  • Trigger related events or update application state based on the content currently being shown.

Parameters

source

A non-null Source object identifying the content item that was played. Refer to the Source documentation for details on the information it provides.

See also